﻿using Sgr.Application.Queries;
using Sgr.AuditLogs.Model;

namespace Sgr.AuditLogs.Services
{
    /// <summary>
    /// 审计日志周统计服务接口
    /// </summary>
    public interface IAuditSummaryService
    {
        /// <summary>
        /// 获取指定时间范围内的小时活跃度分布
        /// </summary>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns>包含24个元素的数组，索引0代表0-1点，索引23代表23-24点的操作总数</returns>
        Task<int[]> GetHourlyActivityDistribution(DateTime start, DateTime end, CancellationToken cancellationToken = default);

        /// <summary>
        /// 获取指定时间范围内的操作统计信息
        /// </summary>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns>操作统计结果</returns>
        Task<OperationStatistics> GetOperationStatistics(DateTime start, DateTime end, CancellationToken cancellationToken = default);
    }
}